const initialState = { token: localStorage.getItem("geek-pc-token") || "" }
export default function loginReducer(state = initialState, active) {
  switch (active.type) {
    case "SET_TOKEN":
      return { token: active.payload }
    case "CLEAR_TOKEN":
      return { token: "" }
    default:
      return state
  }
}
